export interface PIconProps {
  name: string;
  size?: number;
  color?: string;
  weight?: string;
  onClick?: () => void;
}
function PIcon(props: PIconProps) {
  const {
    name = "",
    size = 16,
    color = "#777",
    weight = "normal",
    onClick = () => {},
  } = props;
  return (
    <i
      onClick={onClick}
      className={`iconfont ${name}`}
      style={{
        fontSize: `${size}px`,
        color: color,
        fontWeight: weight,
        cursor: "pointer",
      }}
      {...props}
    ></i>
  );
}

export default PIcon;
